import requests
from lxml import etree


# url = "https://mp.weixin.qq.com/s?src=11&timestamp=1536060602&ver=1102&signature=VUth0ZWGauvmGj-qFSBYAmiLbYNe8*88AG23t9K27qCFTb*h8GL625MlZoxMXcbGkPx*2gmYft6lZ2P-akBPAzKzqWqNb1Wm7WTvp3IovzvsMxw27upXgZIrFRHoGaAe&new=1"
url = "https://mp.weixin.qq.com/s?__biz=MzAxMDU0MDYwMQ==&mid=2653009783&idx=1&sn=520db9716fe0e30f896126abdc364d86&chksm=809bd421b7ec5d37fd7d83a50d6acca53e91ac9bb8875957ce8021f421c4ef45145536a74beb&scene=21#wechat_redirect"


html = requests.get(url).content.decode('utf-8',errors='ignore')
html = html.replace("data-src", "src")
print(html)
dom_html = etree.HTML(html)

with open('1.html', 'w', encoding='utf-8') as f:
    f.write(html)